package com.platform.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * Description: 返回前端菜单树(根据权限过滤)
 *
 * @author libin created on 2020/8/26.
 */
@Data
public class MenuTree implements Serializable {

    @JsonIgnore
    private String id;
    @JsonIgnore
    private String parentId;
    private String name;
    private String title;
    private String icon;
    private String url;
    private String desc;
    private String subSystemCode;
    private String linkType;
    @JsonIgnore
    private Integer sort;
    private List<MenuTree> children;

    public void add(MenuTree child) {
        children.add(child);
    }
}
